package com.example.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@SpringBootApplication
@ComponentScan(basePackages = "com.example.demo")
public class DemoApplication {
    private static final Logger logger = LoggerFactory.getLogger(DemoApplication.class);
    
    public static void main(String[] args) {
        try {
            SpringApplication.run(DemoApplication.class, args);
            logger.info("应用程序启动成功");
        } catch (Exception e) {
            logger.error("应用程序启动失败: ", e);
        }
    }
} 